package com.jiechuang.common.bean;

import lombok.Data;
import java.util.List;
import java.util.Objects;

@Data
public class Permission {
    private Integer id;
    private String permissionName;
    private String permissionCode;
    private Integer parentId;
    private Integer permissionLevel;
    private List<Permission> children;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Permission that = (Permission) o;
        return Objects.equals(id, that.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}
